//
// Created by denglibin on 2021/3/26.
//
#include <SDL.h>

int main2_1(int argc, char* argv[]){

    //初始化，成功返回0
   if (SDL_Init(SDL_INIT_VIDEO)) {
       SDL_Log("Can not init video %s\n", SDL_GetError());
       return 1;
   }
   SDL_Window * win = SDL_CreateWindow("Hello World",
                    SDL_WINDOWPOS_CENTERED,
                    SDL_WINDOWPOS_CENTERED,
                    400,
                    300,
                    SDL_WINDOW_SHOWN
                    );
   if (win == NULL) {
       SDL_Log("Can not create window %s\n", SDL_GetError());
       return 2;
   }
   SDL_Delay(3000);
   return 0;

}

